package com.lx.springcloud.demo1.book.controller;

import com.lx.springcloud.demo1.book.beans.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @Autowired
    private Book book;

    @GetMapping(value = "hello")
    public String index(){
        return "server is ok";
    }

    @GetMapping(value = "book")
    public String book(){
        return book.toString();
    }
}
